function shellSort(arr){
    var len = arr.length
    for(var i = Math.floor(len/2); i>0; i = Math.floor(i/2)){
        for(var j=i;j<len;j++){
            var f = j
            var current = arr[j]
            while(f-i>=0 && current<arr[f-i]){
                arr[f] = arr[f-i]
                f = f - gap
            }
            arr[j] = current
        }
    }
}